Skip to content

tunnels: preserve reconnect pause reasons - #331103

Open
Ulugbek Abdullaev (ulugbekna) wants to merge 2 commits into
microsoft:mainfrom
ulugbekna:ulugbekna/fix-tunnel-reconnect-loop
Open

tunnels: preserve reconnect pause reasons#331103
Ulugbek Abdullaev (ulugbekna) wants to merge 2 commits into
microsoft:mainfrom
ulugbekna:ulugbekna/fix-tunnel-reconnect-loop

Conversation

@ulugbekna

Copy link
Copy Markdown
Contributor

Fixes #331102

Summary

  • preserve the reason each tunnel auto-reconnect loop paused
  • resume exhausted retries on focus/network recovery, authentication pauses on session changes, and offline pauses only after discovery confirms the host is online
  • prevent window focus from connecting untracked or known-offline cached tunnels
  • document the reconnect recovery contract

Testing

  • npm run typecheck-client
  • npm run eslint -- src/vs/sessions/contrib/providers/remoteAgentHost/browser/tunnelAgentHost.contribution.ts src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/tunnelAgentHost.contribution.test.ts
  • ./scripts/test.sh --run src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/tunnelAgentHost.contribution.test.ts

Fixes microsoft#331102

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7a940617-0dcd-4977-ac27-8078a8937524

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Preserves tunnel reconnect pause reasons and resumes reconnects only on compatible recovery signals.

Changes:

  • Tracks per-tunnel pause reasons and filters recovery triggers.
  • Adds regression tests for focus, authentication, and discovery recovery.
  • Documents the reconnect recovery contract.
Show a summary per file
File Description
tunnelAgentHost.contribution.ts Implements reason-aware reconnect recovery.
tunnelAgentHost.contribution.test.ts Tests pause-reason recovery behavior.
REMOTE_AGENT_HOST_SESSIONS_PROVIDER.md Documents reconnect semantics.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7a940617-0dcd-4977-ac27-8078a8937524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tunnel Agent Host retries offline cached tunnels on every window focus

2 participants